Component({
  properties: {
    begin: {
      type: Boolean,
      value: false,
      observer(newValue, oldValue) {
        // 注意, 这里有改变才会影响data中的值
        // console.log(oldValue, newValue)
        if (newValue) {
          this.setData({
            list: [
              {value: 1, label: '直接发货', begin: false},
              {value: 2, label: '放入云仓', begin: true},
            ]
          })
          this.triggerEvent('changeStore', {value: 2})
        } else {
          // this.triggerEvent('changeStore', 1)
        }
      }
    },
    num: {
      type: Number,
      value: 0
    },
  },
  data: {
    list: [
      {value: 1, label: '直接发货', begin: true},
      {value: 2, label: '放入云仓', begin: false},
    ]
  },
  methods: {
    radioChange(e) {
      this.triggerEvent('changeStore', e.detail)
    }
  }
});
